<?phpsession_start();
include('database.php');
/*
Template Name: Template Investment Criteria
*/

	get_header();

	if (have_posts()) : while (have_posts()) : the_post(); 

	// GET CUSTOM SIDEBAR
	$sidebar = get_post_meta($post->ID, 'sidebar_value', true);

	?><head><link rel='stylesheet' type='text/css' href='<?php echo bloginfo('template_url') ?>/dashboard.css' /><link rel="stylesheet" type="text/css" href="<?php echo bloginfo('template_url') ?>/main_dashboard.css"/></head>	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript" src="<?php echo bloginfo('template_url') ?>/js/script.js"></script><br><br>    <div id="dolphincontainer">    <div id="dolphinnav">    <ul>     <li><a href="<?php echo bloginfo('url')?>/investor_dashboard/" title="" ><span>Dashboard</span></a></li>	<li><a href="<?php echo bloginfo('url')?>/search_proposal/" title="" ><span>Search Proposal</span></a></li>	<li><a href="<?php echo bloginfo('url')?>/investment_criteria/" title="" class="current"><span>Investment Criteria</span></a></li>    <li><a href="<?php echo bloginfo('url')?>/edit-profile/" title="" ><span>Profile</span></a></li>       </ul>    </div>    </div>
	<Script>$(document).ready(function(){var valid=false;//cek limit charactersfunction isNumber (o) {  return ! isNaN (o-0);}  $("#title").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>30) {     $(this).val(txtVal.substring(0,30) ) }});	$("#company").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>30) {     $(this).val(txtVal.substring(0,30) ) }});	$("#address").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>50) {     $(this).val(txtVal.substring(0,50) ) } });	$("#post_code").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>10 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,10) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	$("#phone").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>10 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,10) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	$("#fax").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>10 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,10) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	$("#starting_range").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>10 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,10) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	$("#ending_range").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>10 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,10) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	$("#keyword_of_interest").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>50) {     $(this).val(txtVal.substring(0,50) ) }});	 $("#investment_criteria").click(function(){$("#div_investment_criteria").slideToggle();valid=false;}); $("#investment_criteria_button").click(function(){valid=true;});$("#form_investment_criteria").submit(function() {if($("#title").val() ==''){$("#title").css("border-color","red");valid=false;}if($("#company").val() ==''){$("#company").css("border-color","red");valid=false;}if($("#location").val() ==''){$("#location").css("border-color","red");valid=false;}if($("#state").val() ==''){$("#state").css("border-color","red");valid=false;}if($("#starting_range").val() ==''){$("#starting_range").css("border-color","red");valid=false;}if($("#ending_range").val() ==''){$("#ending_range").css("border-color","red");valid=false;}if($("#title").val() !=''){$("#title").css("border-color","rgb(212,212,212)");}if($("#company").val() !=''){$("#company").css("border-color","rgb(212,212,212)");}if($("#location").val() !=''){$("#location").css("border-color","rgb(212,212,212)");}if($("#state").val() !=''){$("#state").css("border-color","rgb(212,212,212)");}if($("#starting_range").val() !=''){$("#starting_range").css("border-color","rgb(212,212,212)");}if($("#ending_range").val() !=''){$("#ending_range").css("border-color","rgb(212,212,212)");}if(valid) {return true;}else{return false;}});});</script>	
	<div id="content">

		<div class="contentbox <?php
			if ($sidebar == 'No sidebar') :

				echo'wfull';

			elseif ($sidebar == 'Buddy Sidebar') :

				echo'w720';

			else :

				echo'w620';

			endif; ?>"></br><font style="font-size:30px"><b><center>ADD Business Proposal</b></font></br><br><form action="<?php echo bloginfo('template_url') ?>/investment_criteria_process.php" method="POST" name="form_investment_criteria" id="form_investment_criteria"   ><table><br><tr>
<td><button id="investment_criteria" style="width:100%;height:30px" >Investment Criteria</button></td></tr><tr><table id="div_investment_criteria"><script type="text/javascript">$(document).ready(function() {    	$("#location").change(function() {		$(this).after('<div id="loader"><img src="<?php echo bloginfo('template_url'); ?>/images/loading.gif" alt="loading State..." /></div>');		$.get('<?php echo bloginfo('template_url'); ?>/country.php?status=investor&country=' + $(this).val(), function(data) {			$("#state").html(data);			$('#loader').slideUp(200, function() {				$(this).remove();			});		});	    });});</script><tr><?php$q_get= "select title,company from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_get= mysql_db_query($DataBase,$q_get);		while(list($title,$company) = mysql_fetch_row($hq_get)){?><tr><td>Title * :</td><td colspan=6><input type="text" id="title" name="title"  style="height:10px; width:350px; font-size:12pt" value="<?php echo $title ?>"><br><font style="font-size:12px">Maximum 30 characters</font></td></tr><tr><td>Company * :</td><td colspan=6><input type="text" id="company" name="company"  style="height:25px; width:350px; font-size:12pt" value="<?php echo $company ?>"><br><font style="font-size:12px">Maximum 30 characters</font></td></tr><?php  } ?><tr><td>Country * :</td><td colspan=6><select id="location" name="location"  style="height:25px; font-size:13pt" ><?php$q_location= "select location from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_location= mysql_db_query($DataBase,$q_location);	//echo mysql_num_rows($hq_location);	while(list($country_actual,$id) = mysql_fetch_row($hq_location)){$q_location= "select country_name,country_id from country_investor";$hq_location= mysql_db_query($DataBase,$q_location);while(list($country,$id) = mysql_fetch_row($hq_location)){?>		<option value="<?php  echo $country ?>" <?php if($country_actual==$country){ echo "selected"; } ?> ><?php echo $country ?></option>							<?php }?>																<?php } if(mysql_num_rows($hq_location)==0){ $q_location= "select country_name,country_id from country_investor";$hq_location= mysql_db_query($DataBase,$q_location);while(list($country,$id) = mysql_fetch_row($hq_location)){?>							<option value="<?php  echo $country ?>"><?php echo $country ?></option>														<?php }?>			<?php } ?>								</select></td></tr><tr><td>State * :</td><td colspan=6><select id="state" name="state"  style="height:25px; font-size:13pt" ><?php$q_state= "select state from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_state= mysql_db_query($DataBase,$q_state);		while(list($state) = mysql_fetch_row($hq_state)){?><option value="<?php echo $state; ?>" selected ><?php echo $state; ?></option>							<?php  } if(mysql_num_rows($hq_state)==0){ ?>								<?php  } ?>								</select></td></tr><tr><?php$q_get= "select address,post_code,phone,fax,website,email from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_get= mysql_db_query($DataBase,$q_get);		while(list($address,$post_code,$phone,$fax,$website,$email) = mysql_fetch_row($hq_get)){?><Td>Address :</td><td colspan=6><input type="text" id="address" name="address"  style="height:25px; width:500px; font-size:12pt" value="<?php echo $address; ?>"><br><font style="font-size:12px">Maximum 50 characters</font></td></tr><tr><td>Post Code :</td><td colspan=6><input type="text" id="post_code" name="post_code"  style="height:25px; width:100px; font-size:12pt" value="<?php echo $post_code; ?>"><br><font style="font-size:12px">Maximum 10 digit</font></td></tr><tr><td>Phone :</td><td colspan=6><input type="text" id="phone" name="phone"  style="height:25px; width:200px; font-size:12pt" value="<?php echo $phone; ?>"><br><font style="font-size:12px">Maximum 15 characters</font></td></tr><tr><td>Fax :</td><td colspan=6><input type="text" id="fax" name="fax"  style="height:25px; width:200px; font-size:12pt" value="<?php echo $fax; ?>"><br><font style="font-size:12px">Maximum 15 characters</font></td></tr><tr><td>Website :</td><td colspan=6><input type="text" id="website" name="website"  style="height:25px; width:200px; font-size:12pt" value="<?php echo $website; ?>"></td></tr><tr><td>Email :</td><td colspan=6><input type="email" id="email" name="email"  style="height:25px; width:200px; font-size:12pt" value="<?php echo $email; ?>"></td><?php  } ?></tr><tr><td  colspan=6>What Industry are you Interested in :</td></tr><tr><td></td><?php$q_industry= "select real_estate,it,tourism,manufacturing,E_Commerce,Entertainment,Pharmacy,Personal_care,Education,Leisure,Transportation,Agriculture,Building,Financial,Security,Mining,Retail,Marketing,Fashion,Aviation,Media,Biotechnology,Telecom,Food,Others from industry where investor_id='$_SESSION[user_id]'";$hq_industry= mysql_db_query($DataBase,$q_industry);	while(list($real_estate,$it,$tourism,$manufacturing,$e_commerce,$entertaiment,$pharmacy,$personal_care,$education,$leisure,$transportation,$agriculture,$building,$financial,$security,$mining,$retail,$marketing,$fashion,$aviation,$media,$biotechnology,$telecom,$food) = mysql_fetch_row($hq_industry)){?><td colspan=3><input type="checkbox" name="real_estate" value="Real Estate" <?php if($real_estate!=''){ echo "checked"; } ?>>Real Estate</td><td colspan=3><input type="checkbox" name="it" value="Information Technology" <?php if($it!=''){ echo "checked"; } ?>>Information Technology</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Tourism" value="Tourism Hospitality, Restaurants & Bars" <?php if($tourism!=''){ echo "checked"; } ?>>Tourism Hospitality, Restaurants & Bars</td><td colspan=3><input type="checkbox" name="Manufacturing" value="Manufacturing" <?php if($manufacturing!=''){ echo "checked"; } ?>>Manufacturing</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="E_Commerce" value="E-Commerce" <?php if($e_commerce!=''){ echo "checked"; } ?>>E-Commerce</td><td colspan=3><input type="checkbox" name="Entertainment" value="Entertainment" <?php if($entertainment!=''){ echo "checked"; } ?>>Entertainment</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Pharmacy" value="Pharmacy" <?php if($pharmacy!=''){ echo "checked"; } ?>>Pharmacy</td><td colspan=3><input type="checkbox" name="Personal-care" value="Personal-care" <?php if($personal_care!=''){ echo "checked"; } ?>>Personal-care</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Education" value="Education and Training" <?php if($education!=''){ echo "checked"; } ?>>Education and Training</td><td colspan=3><input type="checkbox" name="Leisure" value="Leisure, Tourism & Hotels" <?php if($leisure!=''){ echo "checked"; } ?>>Leisure, Tourism & Hotels</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Transportation" value="Transportation" <?php if($transportation!=''){ echo "checked"; } ?>>Transportation</td><td colspan=3><input type="checkbox" name="Agriculture" value="Agriculture" <?php if($agriculture!=''){ echo "checked"; } ?>>Agriculture</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Building" value="Building Services & Products" <?php if($building!=''){ echo "checked"; } ?>>Building Services & Products</td><td colspan=3><input type="checkbox" name="Financial" value="Financial, Business & Legal Services" <?php if($financial!=''){ echo "checked"; } ?>>Financial, Business & Legal Services</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Security" value="Security & Defense" <?php if($security!=''){ echo "checked"; } ?>>Security & Defense</td><td colspan=3><input type="checkbox" name="Mining" value="Mining, Oil & Gas" <?php if($mining!=''){ echo "checked"; } ?>>Mining, Oil & Gas</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Retail" value="Retail" <?php if($retail!=''){ echo "checked"; } ?>>Retail</td><td colspan=3><input type="checkbox" name="Marketing" value="Marketing & Advertising" <?php if($marketing!=''){ echo "checked"; } ?>>Marketing & Advertising</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Fashion" value="Fashion & Beauty" <?php if($fashion!=''){ echo "checked"; } ?>>Fashion & Beauty</td><td colspan=3><input type="checkbox" name="Aviation" value="Aviation" <?php if($aviation!=''){ echo "checked"; } ?>>Aviation</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Media" value="Media & Publishing" <?php if($media!=''){ echo "checked"; } ?>>Media & Publishing</td><td colspan=3><input type="checkbox" name="Biotechnology" value="Biotechnology& Life Sciences" <?php if($biotechnology!=''){ echo "checked"; } ?>>Biotechnology& Life Sciences</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Telecom" value="Telecom & Mobile" <?php if($telecom!=''){ echo "checked"; } ?>>Telecom & Mobile</td><td colspan=3><input type="checkbox" name="Food" value="Food and beverage Industry" <?php if($food!=''){ echo "checked"; } ?>>Food and beverage Industry</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Others" value="Others" <?php if($others!=''){ echo "checked"; } ?>>Others</td><?php  } if(mysql_num_rows($hq_industry)==0){ ?><td colspan=3><input type="checkbox" name="real_estate" value="real estate" >Real Estate</td><td colspan=3><input type="checkbox" name="it" value="information technology" >Information Technology</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Tourism" value="Tourism Hospitality, Restaurants & Bars" >Tourism Hospitality, Restaurants & Bars</td><td colspan=3><input type="checkbox" name="Manufacturing" value="Manufacturing" >Manufacturing</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="E_Commerce" value="E-Commerce" >E-Commerce</td><td colspan=3><input type="checkbox" name="Entertainment" value="Entertainment" >Entertainment</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Pharmacy" value="Pharmacy" >Pharmacy</td><td colspan=3><input type="checkbox" name="Personal-care" value="Personal-care" >Personal-care</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Education" value="Education and Training" >Education and Training</td><td colspan=3><input type="checkbox" name="Leisure" value="Leisure, Tourism & Hotels" >Leisure, Tourism & Hotels</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Transportation" value="Transportation" >Transportation</td><td colspan=3><input type="checkbox" name="Agriculture" value="Agriculture" >Agriculture</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Building" value="Building Services & Products" >Building Services & Products</td><td colspan=3><input type="checkbox" name="Financial" value="Financial, Business & Legal Services" >Financial, Business & Legal Services</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Security" value="Security & Defense" >Security & Defense</td><td colspan=3><input type="checkbox" name="Mining" value="Mining, Oil & Gas">Mining, Oil & Gas</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Retail" value="Retail" >Retail</td><td colspan=3><input type="checkbox" name="Marketing" value="Marketing & Advertising" >Marketing & Advertising</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Fashion" value="Fashion & Beauty" >Fashion & Beauty</td><td colspan=3><input type="checkbox" name="Aviation" value="Aviation" >Aviation</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Media" value="Media & Publishing">Media & Publishing</td><td colspan=3><input type="checkbox" name="Biotechnology" value="Biotechnology& Life Sciences" >Biotechnology& Life Sciences</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Telecom" value="Telecom & Mobile" >Telecom & Mobile</td><td colspan=3><input type="checkbox" name="Food" value="Food and beverage Industry" >Food and beverage Industry</td></tr><tr><td></td><td colspan=3><input type="checkbox" name="Others" value="Others" >Others</td><?php  }  ?></tr>											<tr><td>What stage of business are you interested in :</td><td colspan=6><select id="stage" name="stage"  style="height:25px; font-size:13pt" ><?php$q_stage= "select stage from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_stage= mysql_db_query($DataBase,$q_stage);		while(list($stage) = mysql_fetch_row($hq_stage)){?>								<option value="pre-startup/R&D" <?php  if($stage=="pre-startup/R&D"){ echo "selected"; } ?>>Pre-Startup / R&D</option>							<option value="finished product" <?php  if($stage=="finished product"){ echo "selected"; } ?>>Finished Product</option>							<option value="achieving sales" <?php  if($stage=="achieving sales"){ echo "selected"; } ?>>Achieving Sales</option>							<option value="breaking even" <?php  if($stage=="breaking even"){ echo "selected"; } ?>>Breaking Even</option>							<option value="profitable" <?php  if($stage=="profitable"){ echo "selected"; } ?>>Profitable</option>							<option value="others" <?php  if($stage=="others"){ echo "selected"; } ?>>Others</option>							<?php  } if(mysql_num_rows($hq_stage)==0){ ?>							<option value="">Select One</option>							<option value="pre-startup/R&D">Pre-Startup / R&D</option>							<option value="finished product">Finished Product</option>							<option value="achieving sales">Achieving Sales</option>							<option value="breaking even">Breaking Even</option>							<option value="profitable">Profitable</option>							<option value="others">Others</option><?php } ?>							</select></td></tr>								<tr><td colspan=6>What Language can you speak :</td></tr>	<?php$q_language= "select english,french,spanish,german,portugese,mandarin,cantonese,arabic,rusian,japanese,italian from language where investor_id='$_SESSION[user_id]'";$hq_language= mysql_db_query($DataBase,$q_language);		while(list($english,$french,$spanish,$german,$portugese,$mandarin,$cantonese,$arabic,$rusian,$japanese,$italian) = mysql_fetch_row($hq_language)){?><tr><td></td><td><input type="checkbox" name="english" value="english" <?php if($english!=''){ echo "checked"; } ?>>English</td><td><input type="checkbox" name="french" value="french" <?php if($french!=''){ echo "checked"; } ?>>French</td><td><input type="checkbox" name="spanish" value="spanish" <?php if($spanish!=''){ echo "checked"; } ?>>Spanish</td><td><input type="checkbox" name="german" value="german" <?php if($german!=''){ echo "checked"; } ?>>German</td><td><input type="checkbox" name="portugese" value="portugese" <?php if($portugese!=''){ echo "checked"; } ?>>Portugese</td><td><input type="checkbox" name="mandarin" value="mandarin" <?php if($mandarin!=''){ echo "checked"; } ?>>Mandarin</td></tr>				<tr><td></td><td><input type="checkbox" name="cantonese" value="cantonese" <?php if($cantonese!=''){ echo "checked"; } ?>>Cantonese</td><td><input type="checkbox" name="arabic" value="arabic" <?php if($arabic!=''){ echo "checked"; } ?>>Arabic</td><td><input type="checkbox" name="rusian" value="rusian" <?php if($rusian!=''){ echo "checked"; } ?>>Rusian</td><td><input type="checkbox" name="japanese" value="japanese" <?php if($japanese!=''){ echo "checked"; } ?>>Japanese</td><td><input type="checkbox" name="italian" value="italian" <?php if($italian!=''){ echo "checked"; } ?>>Italian</td><td></td></tr><?php} if(mysql_num_rows($hq_language)==0){?><tr><td></td><td><input type="checkbox" name="english" value="english">English</td><td><input type="checkbox" name="french" value="french">French</td><td><input type="checkbox" name="spanish" value="spanish">Spanish</td><td><input type="checkbox" name="german" value="german">German</td><td><input type="checkbox" name="portugese" value="portugese">Portugese</td><td><input type="checkbox" name="mandarin" value="mandarin">Mandarin</td></tr>				<tr><td></td><td><input type="checkbox" name="cantonese" value="cantonese">Cantonese</td><td><input type="checkbox" name="arabic" value="arabic">Arabic</td><td><input type="checkbox" name="rusian" value="rusian">Rusian</td><td><input type="checkbox" name="japanese" value="japanese">Japanese</td><td><input type="checkbox" name="italian" value="italian">Italian</td><td></td></tr><?php } ?><tr><td>Starting Funding Range (eg. S$ 10000) *</td><?php$q_starting_range= "select starting_range from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_starting_range= mysql_db_query($DataBase,$q_starting_range);		while(list($starting_range) = mysql_fetch_row($hq_starting_range)){?><td colspan=2>S$ <input type="test" name="starting_range" id="starting_range" value="<?php echo $starting_range; ?>" style="height:20px; width:100px;" ><br><font style="font-size:12px">Maximum 10 digit</font></td><?php } if(mysql_num_rows($hq_starting_range)==0){ ?><td colspan=2>S$ <input type="test" name="starting_range" id="starting_range" value="" style="height:20px; width:100px;" ><br><font style="font-size:12px">Maximum 10 digit</font></td><?php } ?></tr><tr><td>Ending Funding Range (eg. S$ 25000) *</td><?php$q_ending_range= "select ending_range from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_ending_range= mysql_db_query($DataBase,$q_ending_range);		while(list($ending_range) = mysql_fetch_row($hq_ending_range)){?><td colspan=2>S$ <input type="test" name="ending_range" id="ending_range" value="<?php  echo $ending_range; ?>" style="height:20px; width:100px;" ><br><font style="font-size:12px">Maximum 10 digit</font></td><?php } if(mysql_num_rows($hq_ending_range)==0){ ?><td colspan=2>S$ <input type="test" name="ending_range" id="ending_range" value="" style="height:20px; width:100px;" ><br><font style="font-size:12px">Maximum 10 digit</font></td><?php } ?></tr><tr><td>Enter keywords of interest</td><?php$q_summary= "select interest from investment_criteria where investor_id='$_SESSION[user_id]'";$hq_summary= mysql_db_query($DataBase,$q_summary);		while(list($interest) = mysql_fetch_row($hq_summary)){?><td colspan=6><textarea id="keyword_of_interest" name="keyword_of_interest"><?php echo $interest; ?></textarea><br><font style="font-size:12px">Maximum 50 characters</font></td></td><?php } if(mysql_num_rows($hq_summary)==0){ ?><td colspan=6><textarea id="keyword_of_interest" name="keyword_of_interest"></textarea></td><?php  } ?></tr></table></tr>	</table>				<br>		<center><input type="submit" align="center" name="investment_criteria_button" id="investment_criteria_button" value="Submit" style="height:40px;  font-size:13pt;text-transform: none; "  /></center>			</form>									
			<?php
				// CONTENT
				//the_content();

				echo '<div class="clear h20"><!-- --></div>';
				
				// PAGINATION
				wp_link_pages(array('before' => '<p><strong>'.__( 'Pages','pandathemes' ).':</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
				
				// COMMENTS ETC.
				if ( $theme_options['pages_metas'] == 'enable' ) : comments_template(); endif;

	endwhile;

		else : echo '<div class="contentbox w620"><h2>404</h2><p>'.__('Sorry, no posts matched your criteria.','pandathemes').'</p>';

	endif; ?>

	</div> <!-- end_of_contentbox -->

		<?php
			// SIDEBAR
			if ($sidebar == 'Buddy Sidebar') :
				include(TEMPLATEPATH.'/inc/sidebar_buddy.php');
			else :
				include(TEMPLATEPATH.'/inc/sidebar.php');
			endif;

	get_footer();

?>